package com.liws.test.controller;


import com.liws.test.entity.Person;
import com.liws.test.service.IPersonService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liws
 * @since 2023-04-15
 */
@RestController
@RequestMapping("/test/person")
public class PersonController {

    @Resource
    private IPersonService personService;

    @GetMapping("query")
    public List<Person> selectAll(){

        return personService.selectAll();
    }

}

